<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>

		switch(c)
		{
		case"red":
		alert("红色");
		document.body.style.backgroundcolor=c;
		break;
		case"green":
		alert("绿色");
		document.body.style.backgroundcolor=c;
		break;

		}case"blue":
		alert("蓝色");
		document.body.style.backgroundcolor=c;
		break;
		}
	</body>
</html>
